package com.ytf.auth.controller;

import com.ytf.auth.common.CommonParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: OpenController
 * @author: YTF
 * @date: 2025/5/1 9:07
 * @description: 开放接口
 */
@RestController
@Tag(name = "开放API", description = "开放接口")
@RequestMapping("/open")
public class OpenController {

    @Operation(summary = "获取验证码", description = "获取验证码")
    @GetMapping("/sms/send")
    public void captcha(@RequestParam("phone") @Schema(description = "手机号") String phone){
        // 生成验证码调用短信平台
        // 保存验证码和手机号
        // 临时模拟下 直接保存到
        CommonParam.CAPTCHA.put(phone,"123");
    }
}
